#include<iostream>
using namespace std;
const int N = 1e6 + 10;
int n;
int p[N];
bool st[N];
int arr[N];
int find(int x)
{
	if (x != p[x]) {
		p[x] = find(p[x]);
	}
	return p[x];
}
int main()
{
	cin >> n;
	for (int i = 1; i < N; i++)p[i] = i;
	for (int i = 1; i <= n; i++) {
		scanf("%d", &arr[i]);
	}
	for (int i = 1; i <= n; i++) {
		if (st[arr[i]]) {
			int x = find(arr[i]);
			//cout << "xx=" << x << endl;
			p[x] = x + 1;
			cout << x << " ";
			st[x] = 1;
		}
		else {
			st[arr[i]] = 1;
			p[arr[i]] = arr[i] + 1;
			cout << arr[i] << " ";
		}
	}
	return 0;
}